package com.tencent.abstract_and_interface;
/**
 * 1
 * @author Administrator
 *
 */
public class EmployeeDemo {
	public static void main(String[] args) {
		JavaTeacher teacher = new JavaTeacher(1,"张三",10000);
		teacher.work();
		Leader leader = new Leader(2,"李四",20000,1000.2);
		leader.work();
		
		
		//多态：父类的引用指向子类的对象
//		Employee teacher2 = new JavaTeacher(1,"张三",10000);
//		teacher.work();
//		Employee leader2 = new Leader(2,"李四",20000,1000.2);
//		leader.work();
	}
}
